/*    */ package com.wgcloud.service;
/*    */ 
/*    */ import com.github.pagehelper.PageHelper;
/*    */ import com.github.pagehelper.PageInfo;
/*    */ import com.wgcloud.entity.DeskState;
/*    */ import com.wgcloud.mapper.DeskStateMapper;
/*    */ import com.wgcloud.util.DateUtil;
/*    */ import com.wgcloud.util.UUIDUtil;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.stereotype.Service;
/*    */ import org.springframework.transaction.annotation.Transactional;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ @Service
/*    */ public class DeskStateService
/*    */ {
/*    */   @Autowired
/*    */   private DeskStateMapper deskStateMapper;
/*    */   
/*    */   public PageInfo selectByParams(Map<String, Object> params, int currPage, int pageSize) throws Exception {
/* 28 */     PageHelper.startPage(currPage, pageSize);
/* 29 */     List<DeskState> list = this.deskStateMapper.selectByParams(params);
/* 30 */     PageInfo<DeskState> pageInfo = new PageInfo(list);
/* 31 */     return pageInfo;
/*    */   }
/*    */   
/*    */   public void save(DeskState deskState) throws Exception {
/* 35 */     deskState.setId(UUIDUtil.getUUID());
/* 36 */     deskState.setCreateTime(DateUtil.getNowTime());
/* 37 */     this.deskStateMapper.save(deskState);
/*    */   }
/*    */   
/*    */   @Transactional
/*    */   public void saveRecord(List<DeskState> recordList) throws Exception {
/* 42 */     if (recordList.size() < 1) {
/*    */       return;
/*    */     }
/* 45 */     for (DeskState as : recordList) {
/* 46 */       as.setId(UUIDUtil.getUUID());
/*    */     }
/* 48 */     this.deskStateMapper.insertList(recordList);
/*    */   }
/*    */   
/*    */   public int deleteById(String[] id) throws Exception {
/* 52 */     return this.deskStateMapper.deleteById(id);
/*    */   }
/*    */   
/*    */   public DeskState selectById(String id) throws Exception {
/* 56 */     return this.deskStateMapper.selectById(id);
/*    */   }
/*    */   
/*    */   public List<DeskState> selectAllByParams(Map<String, Object> params) throws Exception {
/* 60 */     return this.deskStateMapper.selectAllByParams(params);
/*    */   }
/*    */   
/*    */   public int deleteByAccHname(List<String> recordList) throws Exception {
/* 64 */     return this.deskStateMapper.deleteByAccHname(recordList);
/*    */   }
/*    */   
/*    */   public int deleteByAccountAndDate(Map<String, Object> map) throws Exception {
/* 68 */     return this.deskStateMapper.deleteByAccountAndDate(map);
/*    */   }
/*    */ }


/* Location:              /Users/zhangyongxin/soft-install/wgcloud/wgcloud-v3.3.5/server/bank/wgcloud-server-release.jar!/BOOT-INF/classes/com/wgcloud/service/DeskStateService.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */